
<div class="tab-pane " id = "presaleset">
	<div class="panel panel-default" role="tabpanel" style="">
		<div class="panel-heading">图文内容
			{if $isold==true && !$_G['isSuperAdmin']}
			{php $sold_tips='已禁用，如需修改请联系工作人员';}
			{elseif $config['presale']['isdesign']==1}
			{php $sold_tips='已禁用，如需修改请点击上方【在线图文编辑】';}
			{else}
			{php $sold_tips='';}
			{/if}
			{if !empty($sold_tips)}<span style="color: #6db4d6"> {$sold_tips}</span>{/if}</div>
		<div class="panel-body" style="">
			<input type="hidden" name="presale_isdesign" value="{$config['presale']['isdesign']}" />
			{if $config['presale']['isdesign']==1 && !($isold==true && !$_G['isSuperAdmin'])}
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">在线编辑</label>
				<div class="col-sm-8 col-xs-12">
					{if $_G['isSuperAdmin']}
					<a href="{php echo createWebUrl('theme',array('op'=>'close_design','themeid'=>$themeid,'presale'=>1));}" onclick="if(!confirm('确认关闭在线编辑吗，不可恢复')) return false;" class="btn btn-default">关闭在线编辑</a>
					{/if}
					<a href="{php echo createWebUrl('theme',array('op'=>'go_design','ac'=>'edit','themeid'=>$themeid,'presale'=>1));}" class="btn btn-info">在线图文编辑</a>
				</div>
			</div>
			{/if}
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label"><span style="color: red;">*</span>活动主标题</label>
				<div class="col-sm-8 col-xs-12">
					<input type="text" class="form-control"  placeholder="" name="presale_title"  value="{$config['presale']['title']}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">活动副标题</label>
				<div class="col-sm-8 col-xs-12">
					<input type="text" class="form-control"  placeholder="" name="presale_desc" value="{$config['presale']['desc']}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">底部补款按扭</label>
				<div class="col-sm-8 col-xs-12">
					<div class="input-group">
						<span class="input-group-addon">未报名按扭：</span>
						<input class="form-control" placeholder="默认为:￥#fee立即抢购" name="menubtn_nopay" value="{if empty($config['presale']['menubtn_nopay'])}￥#fee立即抢购{else}{$config['presale']['menubtn_nopay']}{/if}" type="text">
						<span class="input-group-addon">已报名按扭：</span>
						<input class="form-control" placeholder="默认为:立即补余款￥#fee元" name="menubtn_pay" value="{if empty($config['presale']['menubtn_pay'])}立即补余款￥#fee元{else}{$config['presale']['menubtn_pay']}{/if}" type="text">
					</div>
					<span class="help-block">如:￥#fee立即抢购、立即补余款￥#fee元  ￥#fee为需要补款的金额</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">投屏设置</label>
				<div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
					<label class="radio-inline">
						<input name="presaledaping" value="0" {if $config['presaledaping']==0} checked="checked"{/if} type="radio"> 统计所有
					</label>
					<label class="radio-inline">
						<input name="presaledaping" value="1" {if $config['presaledaping']==1 || !isset($config['presaledaping'])} checked="checked"{/if} type="radio"> 只统计补款定单（只支持0点0分）
					</label>
					<span class="help-block">只支持0点0分：【线上补余款】中的【补款时间】只支持0点，否则0点以后成交的依旧会统计在投屏中</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">补款：Banner轮播</label>
				<div class="col-sm-8 col-xs-12">
					{if !empty($sold_tips)}
					{php echo view_form_field_multi_image('presale_bannerimgs',$config['presale']['bannerimgs'],[],$sold_tips);}
					{else}
					{php echo view_form_field_multi_image('presale_bannerimgs',$config['presale']['bannerimgs']);}
					{/if}
					<span class="help-block">{if !empty($sold_tips)}已禁用,{/if}第一张为活动主图，且为默认的分享图，只有一张时不进行轮播</span>
					{if $isposter}
					<span class="help-block" style="color:red">此活动开启了首图海报，打开员工的链接，将替换活动页面的首图，改为带有员工的二维码的海报图,若为轮播将在最后加入此海报</span>
					{/if}
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">补款：Banner视频</label>
				<div class="col-sm-8 col-xs-12">
					{php echo view_form_field_video('presale_bannervideo',$config['presale']['bannervideo']);}
					<span class="help-block">{if !empty($sold_tips)}已禁用，{/if}精简视频，控制在90秒内为最佳，图文内容还可以放其它视频</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">补款：顶部图片组</label>
				<div class="col-sm-8 col-xs-12">
					{if !empty($sold_tips)}
					{php echo view_form_field_multi_image('presale_centerimgs',$config['presale']['centerimgs'],[],$sold_tips);}
					{else}
					{php echo view_form_field_multi_image('presale_centerimgs',$config['presale']['centerimgs']);}
					{/if}
					<span class="help-block">{if !empty($sold_tips)}已禁用,{/if}在头像下方显示;启用点亮星星时,在其上方</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">补款：裂变图片</label>
				<div class="col-sm-8 col-xs-12">
					{if !empty($sold_tips)}
					{php echo view_form_field_multi_image('presale_imgs',$config['presale']['imgs'],[],$sold_tips);}
					{else}
					{php echo view_form_field_multi_image('presale_imgs',$config['presale']['imgs']);}
					{/if}
					<span class="help-block">{if !empty($sold_tips)}已禁用,{/if}启用点亮星星时,在其中间显示的图片内容,不启用不显示</span>
					<span class="help-block">启用摇一摇红包时,在红包图片下方显示,不启用不显示</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label"><span style="color: red;">*{if !empty($sold_tips)}已禁用{/if}</span>补款：活动内容</label>
				<div class="col-sm-8 col-xs-12">
					{php echo view_ueditor('presale_content', $config['presale']['content']);}
					<span class="help-block">{if !empty($sold_tips)}已禁用,{/if}活动的正文,可放文字/图片/视频</span>
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">补款：底部二维码</label>
				{if $system['softmode']!=1 || $system['wxapp']==0}
				<div class="col-sm-5 col-xs-12">
					{if !empty($sold_tips)}
					{php echo view_form_field_image_sold('presale_addimg',$config['presale']['addimg'],'',[],$sold_tips);}
					{else}
					{php echo view_form_field_image('presale_addimg',$config['presale']['addimg']);}
					{/if}
					<span class="help-block">{if !empty($sold_tips)}已禁用,{/if}H5：长按图片识别二维码 关注官方客服微信</span>
				</div>
				{/if}
				{if $system['wxapp']!=0 && $system['softmode']!=0}
				<div class="col-sm-5 col-xs-12">
					{if !empty($sold_tips)}
					{php echo view_form_field_image_sold('presale_addimgxcx',$config['presale']['addimgxcx'],'',[],$sold_tips);}
					{else}
					{php echo view_form_field_image('presale_addimgxcx',$config['presale']['addimgxcx']);}
					{/if}
					<span class="help-block">{if !empty($sold_tips)}已禁用,{/if}小程序：截图保存二维码，打开微信扫一扫，关注官方客服微信</span>
				</div>
				{/if}
			</div>


			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">补款：视频底图</label>
				<div class="col-sm-8 col-xs-12">
					{php echo view_form_field_multi_image('presale_videoimgs',$config['presale']['videoimgs']);}
					<span class="help-block">多个视频需要上传对应数量的底图,底图尺寸：985*615px</span>
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">补款：背景音乐</label>
				<div class="col-sm-3 col-xs-12">
					<select class="form-control" id = "presale_musictype" name="presale_musictype" onchange="presale_changemusic();">
						<option value="">请选择音乐分类</option>
					</select>
				</div>
				<div class="col-sm-3 col-xs-12">
					<select class="form-control" id = "presale_musicname" name="presale_musicname" onchange="presale_changemusicname();" >
						<option value="">请选择音乐</option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label"></label>
				<div class="col-sm-8 col-xs-12">
					{php echo view_form_field_audio('presale_musicsrc',$config['presale']['musicsrc']);}
					<span class="help-block">mp3文件 不要太大 影响页面加载 用格式工厂压缩一下,控制在1M内</span>
				</div>
			</div>
		</div>
	</div>
</div>
<div class="tab-pane " id = "presalefenxiao">
	{if $system['fenxiao06'] == '1'}
	<div class="panel panel-default" role="tabpanel" style="">
		<div class="panel-heading">员工提成</div>
		<div class="panel-body" style="">
			{if intval($config['comm6_mode'])<1}
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">{if $system['selling_agent'] == '1'}员工无代理的提成{else}员工提成{/if}</label>
				<div class="col-sm-6 col-xs-6">
					<div class="input-group">
						<input class="form-control"  name="presale_comm61" value="{$config['presale']['comm61']}" type="text">
						<span class="input-group-addon"> - </span>
						<input class="form-control"  name="presale_comm62" value="{$config['presale']['comm62']}" type="text">
					</div>
					<span class="help-block" >开启后,员工的卖卡提成直接发放到微信钱包里;若开启三级分销,员工的分销提成与提成都会享有</span>
				</div>
			</div>
			{/if}
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">员工提成规则</label>
				<div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
					<label class="radio-inline">
						<input name="presale_is_comm6" value="0" {if $config['presale']['is_comm6']==0} checked="checked"{/if} type="radio"> 直卖有提成
					</label>
					<label class="radio-inline">
						<input name="presale_is_comm6" value="1" {if $config['presale']['is_comm6']==1} checked="checked"{/if} type="radio"> 直卖无提成
					</label>
				</div>
			</div>
		{if $system['selling_agent'] == '1'}
		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">员工有代理的提成</label>
			<div class="col-sm-6 col-xs-6">
				<div class="input-group">
					<input class="form-control"  name="presale_comm61_agent" value="{$config['presale']['comm61_agent']}" type="text">
					<span class="input-group-addon"> - </span>
					<input class="form-control"  name="presale_comm62_agent" value="{$config['presale']['comm62_agent']}" type="text">
				</div>
				<span class="help-block" >开启代理模式时，员工有代理与无代理需分别设置，不设置视为无提成</span>
			</div>
		</div>
		{/if}
		{if $system['selling_agent'] == '1'}
		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">代理提成</label>
			<div class="col-sm-6 col-xs-6">
				<div class="input-group">
					<input class="form-control"  name="presale_comm_agent1" value="{$config['presale']['comm_agent1']}" type="text">
					<span class="input-group-addon"> - </span>
					<input class="form-control"  name="presale_comm_agent2" value="{$config['presale']['comm_agent2']}" type="text">
				</div>
				<span class="help-block" >开启后,代理的卖卡提成直接发放到微信钱包里;若开启三级分销,代理的分销提成与提成都会享有</span>
			</div>
		</div>
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">代理提成规则</label>
				<div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
					<label class="radio-inline">
						<input name="presale_is_comm6_agent" value="0" {if $config['presale']['is_comm6_agent']==0} checked="checked"{/if} type="radio"> 非直卖有提成
					</label>
					<label class="radio-inline">
						<input name="presale_is_comm6_agent" value="1" {if $config['presale']['is_comm6_agent']==1} checked="checked"{/if} type="radio"> 非直卖无提成
					</label>
				</div>
			</div>
		{/if}
		</div>
	</div>
	{/if}

	{if $system['fenxiao01'] >0 }
	<div class="panel panel-default" role="tabpanel" style="">
		<div class="panel-heading">{if $system['jiage'] >0 }第一价格：{/if}{if $system['fenxiao01'] ==1 }一级分销{elseif $system['fenxiao01'] ==2 }二级分销{else}三级分销{/if}</div>
		<div class="panel-body" style="">
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">员工{php echo $system['selling_agent'] == '1'?'与代理':'';}是否有分销红包</label>
				<div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
					<label class="radio-inline">
						<input name="presale_commworker" value="0" {if $config['presale']['commworker']==0} checked="checked"{/if} type="radio"> 有
					</label>
					<label class="radio-inline">
						<input name="presale_commworker" value="1" {if $config['presale']['commworker']==1} checked="checked"{/if} type="radio"> 没有
					</label>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">分销要求</label>
				<div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
					<label class="radio-inline">
						<input name="presale_intheme" value="0" {if $config['presale']['intheme']==0} checked="checked"{/if} type="radio"> 所有
					</label>
					<label class="radio-inline">
						<input name="presale_intheme" value="1" {if $config['presale']['intheme']==1} checked="checked"{/if} type="radio"> 已支付的客户(员工不支付也可收到)
					</label>
					<span class="help-block" style="color: red;">注意：选择已支付的客户,此客户支付后,别人通过他的链接报名,才能收到红包</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">一级分销红包</label>
				<div class="col-sm-6 col-xs-6">
					<div class="input-group">
						<input class="form-control"  name="presale_comm11" value="{$config['presale']['comm11']}" type="text">
						<span class="input-group-addon" id="basic-addon2"> - </span>
						<input class="form-control"  name="presale_comm12" value="{$config['presale']['comm12']}" type="text">
						<span class="input-group-addon" id="basic-addon2">概率</span>
						<input class="form-control" placeholder="例如:100" name="presale_comm13" value="{$config['presale']['comm13']}" type="text">
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label"></label>
				<div class="col-sm-6 col-xs-6">
					<div class="input-group">
						<input class="form-control"  name="presale_comm11_2" value="{$config['presale']['comm11_2']}" type="text">
						<span class="input-group-addon" id="basic-addon2"> - </span>
						<input class="form-control"  name="presale_comm12_2" value="{$config['presale']['comm12_2']}" type="text">
						<span class="input-group-addon" id="basic-addon2">概率</span>
						<input class="form-control" placeholder="例如:100" name="presale_comm13_2" value="{$config['presale']['comm13_2']}" type="text">
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label"></label>
				<div class="col-sm-6 col-xs-6">
					<div class="input-group">
						<input class="form-control"  name="presale_comm11_3" value="{$config['presale']['comm11_3']}" type="text">
						<span class="input-group-addon" id="basic-addon2"> - </span>
						<input class="form-control"  name="presale_comm12_3" value="{$config['presale']['comm12_3']}" type="text">
						<span class="input-group-addon" id="basic-addon2">概率</span>
						<input class="form-control" readonly value="=100-上方概率" type="text">
					</div>
					<span class="help-block" >注意：A推荐B，B付款，奖励A，属于一级分销，最小金额必须大于0.3元，概率为整数不可带%号</span>
				</div>
			</div>

			{if $system['fenxiao01'] >1 }
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">二级分销红包</label>
				<div class="col-sm-6 col-xs-6">
					<div class="input-group">
						<input class="form-control"  name="presale_comm21" value="{$config['presale']['comm21']}" type="text">
						<span class="input-group-addon" id="basic-addon2"> - </span>
						<input class="form-control"  name="presale_comm22" value="{$config['presale']['comm22']}" type="text">
						<span class="input-group-addon" id="basic-addon2">概率</span>
						<input class="form-control" placeholder="例如:100" name="presale_comm23" value="{$config['presale']['comm23']}" type="text">
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label"></label>
				<div class="col-sm-6 col-xs-6">
					<div class="input-group">
						<input class="form-control"  name="presale_comm21_2" value="{$config['presale']['comm21_2']}" type="text">
						<span class="input-group-addon" id="basic-addon2"> - </span>
						<input class="form-control"  name="presale_comm22_2" value="{$config['presale']['comm22_2']}" type="text">
						<span class="input-group-addon" id="basic-addon2">概率</span>
						<input class="form-control" readonly  value="=100-上方概率" type="text">
					</div>
					<span class="help-block" >注意：A推荐B，B推荐C，C推荐D，D成交后奖励B的钱，最小金额必须大于0.3元</span>
				</div>
			</div>
			{/if}
			{if $system['fenxiao01'] ==3 }
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">三级分销红包</label>
				<div class="col-sm-6 col-xs-6">
					<div class="input-group">
						<input class="form-control"  name="presale_comm31" value="{$config['presale']['comm31']}" type="text">
						<span class="input-group-addon"> - </span>
						<input class="form-control"  name="presale_comm32" value="{$config['presale']['comm32']}" type="text">
						<span class="input-group-addon" id="basic-addon2">概率</span>
						<input class="form-control" placeholder="例如:100" name="presale_comm33" value="{$config['presale']['comm33']}" type="text">
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label"></label>
				<div class="col-sm-6 col-xs-6">
					<div class="input-group">
						<input class="form-control"  name="presale_comm31_2" value="{$config['presale']['comm31_2']}" type="text">
						<span class="input-group-addon" id="basic-addon2"> - </span>
						<input class="form-control"  name="presale_comm32_2" value="{$config['presale']['comm32_2']}" type="text">
						<span class="input-group-addon" id="basic-addon2">概率</span>
						<input class="form-control" readonly  value="=100-上方概率" type="text">
					</div>
					<span class="help-block" >注意：A推荐B，B推荐C，C推荐D，D成交后奖励A的钱,最小金额必须大于0.3元</span>
				</div>
			</div>
			{/if}
		</div>
	</div>
	{/if}
</div>

{if $system['ispresale']==1}
<div class="tab-pane" id="presaleformset">
	<div class="panel panel-default" role="tabpanel" style="">
		<div class="panel-heading">补款价格</div>
		<div class="panel-body" style="">

			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">补款模式</label>
				<div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
					<label class="radio-inline">
						<input name="presaleMode" value="0" {if $config['presale']['presaleMode']==0} checked="checked"{/if} type="radio"> 减订金
					</label>
					<label class="radio-inline">
						<input name="presaleMode" value="1" {if $config['presale']['presaleMode']==1} checked="checked"{/if} type="radio"> 不减订金
					</label>
					<label class="radio-inline">
						<input name="presaleMode" value="2" {if $config['presale']['presaleMode']==2} checked="checked"{/if} type="radio"> 不减订金,未交订金不可补
					</label>
				</div>
			</div>
			{if $system['selecet_pay']==1}
			<div class="form-group" id="bukuan_type1">
				<label class="col-sm-2 col-xs-12 control-label">类型</label>
				<div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
					<span class="help-block">因开了多选支付，不可使用选择多价格</span>
				</div>
			</div>
			{else}
			<div class="form-group" id="bukuan_type">
				<label class="col-sm-2 col-xs-12 control-label">类型</label>
				<div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
					<label class="radio-inline">
						<input name="presalePrice" value="1" {if $config['presale']['presalePrice']<=1} checked="checked"{/if} type="radio"> 1个价格
					</label>
					<label class="radio-inline">
						<input name="presalePrice" value="2" {if $config['presale']['presalePrice']==2} checked="checked"{/if} type="radio"> 2个价格
					</label>
					<label class="radio-inline">
						<input name="presalePrice" value="3" {if $config['presale']['presalePrice']==3} checked="checked"{/if} type="radio"> 3个价格
					</label>
				</div>
			</div>
			<div class="form-group buyukuanbtn">
				<label class="col-sm-2 col-xs-12 control-label">补款价①</label>
				<div class="col-sm-8 col-xs-12">
					<div class="input-group">
						<span class="input-group-addon">价格：</span>
						<input type="text" class="form-control"  placeholder="" name="presaleGroupprice"  value="{$config['presale']['groupprice']}">
						<span class="input-group-addon">元</span>
						<span class="input-group-addon">名称</span>
						<input type="text" class="form-control"  placeholder="" name="presaleFormtextcenter"  value="{$config['presale']['formtextcenter']}">
					</div>
				</div>
			</div>
			<div class="form-group buyukuanbtn">
				<label class="col-sm-2 col-xs-12 control-label">补款价②</label>
				<div class="col-sm-8 col-xs-12">
					<div class="input-group">
						<span class="input-group-addon">价格：</span>
						<input type="text" class="form-control"  placeholder="" name="presaleGroupprice2"  value="{$config['presale']['groupprice2']}">
						<span class="input-group-addon">元</span>
						<span class="input-group-addon">名称</span>
						<input type="text" class="form-control"  placeholder="" name="presaleFormtextcenter2"  value="{$config['presale']['formtextcenter2']}">
					</div>
				</div>
			</div>
			<div class="form-group buyukuanbtn">
				<label class="col-sm-2 col-xs-12 control-label">补款价③</label>
				<div class="col-sm-8 col-xs-12">
					<div class="input-group">
						<span class="input-group-addon">价格：</span>
						<input type="text" class="form-control"  placeholder="" name="presaleGroupprice3"  value="{$config['presale']['groupprice3']}">
						<span class="input-group-addon">元</span>
						<span class="input-group-addon">名称</span>
						<input type="text" class="form-control"  placeholder="" name="presaleFormtextcenter3"  value="{$config['presale']['formtextcenter3']}">
					</div>
				</div>
			</div>
			{/if}
		</div>
	</div>
	<div class="panel panel-default" role="tabpanel" style="">
		<div class="panel-heading">补款表单设置: 默认只收集用户姓名和电话，可以自定义增加【文本信息】【下拉菜单信息】【时间日期选择】</div>
		<div class="panel-body" style="">
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">补款表单</label>
				<div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
					<label class="radio-inline">
						<input name="ispresaleform" value="0" {if $config['presale']['ispresaleform']==0} checked="checked"{/if} type="radio"> 关闭
					</label>
					<label class="radio-inline">
						<input name="ispresaleform" value="1" {if $config['presale']['ispresaleform']==1 || !isset($config['presale']['ispresaleform'])} checked="checked"{/if} type="radio"> 开启
					</label>
					<span class="help-block">补款时姓名与电话不再收集</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">①文本/日期</label>
				<div class="col-sm-8 col-xs-12">
					<div class="input-group">
						<input type="text" class="form-control"  placeholder="" name="presale_datetime"  value="{$config['presale']['datetime']}">
						<span class="input-group-addon">模式</span>
						<select class="form-control" name="presale_datetimetype">
							<option value="1" {if $config['presale']['datetimetype'] == 1 }selected="selected"{/if}>文本</option>
							<option value="2" {if $config['presale']['datetimetype'] == 2 }selected="selected"{/if}>数字</option>
							<option value="6" {if $config['presale']['datetimetype'] == 6 }selected="selected"{/if}>电话</option>
							<option value="0" {if $config['presale']['datetimetype'] == 0 }selected="selected"{/if}>日期</option>
						</select>
					</div>
					<span class="help-block">例如需要日期信息，此处填【**日期】，例如 预约日期，不需要地址信息此处就留空</span>
				</div>
			</div>
			{if ($system['softstyle']!=5 && $system['gift']!=1 && $system['isboxgift']!=1 && $system['is_mystery_boxes']==0 && $system['is_mystery_boxes_feichi']==0 && $config['lz_big_gift']!=1)}
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">②文本/选项</label>
				<div class="col-sm-8 col-xs-12">
					<div class="input-group">
						<input type="text" class="form-control"  placeholder="" name="presale_address"  value="{$config['presale']['address']}">
						<span class="input-group-addon">模式</span>
						<select class="form-control" name="presale_addresstype">
							<option value="0" {if $config['presale']['addresstype'] == 0 }selected="selected"{/if}>文本</option>
							<option value="1" {if $config['presale']['addresstype'] == 1 }selected="selected"{/if}>数字</option>
							<option value="6" {if $config['presale']['addresstype'] == 6 }selected="selected"{/if}>电话</option>
							<option value="7" {if $config['presale']['addresstype'] == 7 }selected="selected"{/if}>日期</option>
							<option value="2" {if $config['presale']['addresstype'] == 2 }selected="selected"{/if}>下拉菜单</option>
							<option value="3" {if $config['presale']['addresstype'] == 3 }selected="selected"{/if}>单选</option>
							<option value="9" {if $config['presale']['addresstype'] == 9 }selected="selected"{/if}>车牌号</option>
						</select>
					</div>
					<span class="help-block">例如需要地址信息，此处填【**地址】，例如 您的地址，不需要地址信息此处就留空</span>
				</div>
			</div>
			{if $config['presale']['addresstype'] == 2 || $config['presale']['addresstype'] == 3 }
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label"></label>
				<div class="col-sm-8 col-xs-12">
					<div id="presale_addressoptions">
						<div class="tpl">
							{if !empty($config['presale']['addressoptions'])}
							{loop $config['presale']['addressoptions'] $row}
							<div class="input-group" style="margin-top: 10px;">
								<span class="input-group-addon">选项名称</span>
								<input type="text" name="presale_addressoptions[]" value="{$row}" class="form-control" placeholder="选项名称">
								<span class="input-group-addon"><a href="javascript:;" class="presale_deladdressoptions"><i class="fa fa-times"></i></a></span>
							</div>
							{/loop}
							{else}
							<div class="input-group">
								<span class="input-group-addon">选项名称</span>
								<input type="text" name="presale_addressoptions[]" class="form-control" placeholder="选项名称">
								<span class="input-group-addon"><a href="javascript:;" class="presale_deladdressoptions"><i  class="fa fa-times"></i></a></span>
							</div>
							{/if}
						</div>
						<a href="javascript:;" class="presale_addaddressoptions" style="margin-top: 20px;"><i style="margin-top: 10px;" class="fa fa-plus-circle"></i> 添加选项</a>
					</div>
				</div>
			</div>
			{/if}

			{/if}
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">③文本/选项</label>
				<div class="col-sm-8 col-xs-12">
					<div class="input-group">
						<input type="text" class="form-control"  placeholder="" name="presale_formtwo"  value="{$config['presale']['formtwo']}">
						<span class="input-group-addon">模式</span>
						<select class="form-control" name="presale_formtwotype">
							<option value="0" {if $config['presale']['formtwotype'] == 0 }selected="selected"{/if}>文本</option>
							<option value="1" {if $config['presale']['formtwotype'] == 1 }selected="selected"{/if}>数字</option>
							<option value="6" {if $config['presale']['formtwotype'] == 6 }selected="selected"{/if}>电话</option>
							<option value="7" {if $config['presale']['formtwotype'] == 7 }selected="selected"{/if}>日期</option>
							<option value="2" {if $config['presale']['formtwotype'] == 2 }selected="selected"{/if}>下拉菜单</option>
							<option value="3" {if $config['presale']['formtwotype'] == 3 }selected="selected"{/if}>单选</option>
							<option value="9" {if $config['presale']['formtwotype'] == 9 }selected="selected"{/if}>车牌号</option>
						</select>
					</div>
					<span class="help-block">例如需要地址信息，此处填【**地址】，例如 您的地址，不需要地址信息此处就留空</span>
				</div>
			</div>
			{if $config['presale']['formtwotype'] == 2 || $config['presale']['formtwotype'] == 3 }
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label"></label>
				<div class="col-sm-8 col-xs-12">
					<div id="presale_formtwooptions">
						<div class="tpl">
							{if !empty($config['presale']['formtwooptions'])}
							{loop $config['presale']['formtwooptions'] $row}
							<div class="input-group" style="margin-top: 10px;">
								<span class="input-group-addon">选项名称</span>
								<input type="text" name="presale_formtwooptions[]" value="{$row}" class="form-control" placeholder="选项名称">
								<span class="input-group-addon"><a href="javascript:;" class="presale_delformtwooptions"><i class="fa fa-times"></i></a></span>
							</div>
							{/loop}
							{else}
							<div class="input-group">
								<span class="input-group-addon">选项名称</span>
								<input type="text" name="presale_formtwooptions[]" class="form-control" placeholder="选项名称">
								<span class="input-group-addon"><a href="javascript:;" class="presale_delformtwooptions"><i  class="fa fa-times"></i></a></span>
							</div>
							{/if}
						</div>
						<a href="javascript:;" class="presale_addformtwooptions" style="margin-top: 20px;"><i style="margin-top: 10px;" class="fa fa-plus-circle"></i> 添加选项</a>
					</div>
				</div>
			</div>
			{/if}

			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">④文本/日期</label>
				<div class="col-sm-8 col-xs-12">
					<div class="input-group">
						<input type="text" class="form-control"  placeholder="" name="presale_addinfo"  value="{$config['presale']['addinfo']}">
						<span class="input-group-addon">模式</span>
						<select class="form-control" name="presale_addinfotype">
							<option value="1" {if $config['presale']['addinfotype'] == 1 }selected="selected"{/if}>文本</option>
							<option value="2" {if $config['presale']['addinfotype'] == 2 }selected="selected"{/if}>数字</option>
							<option value="6" {if $config['presale']['addinfotype'] == 6 }selected="selected"{/if}>电话</option>
							<option value="0" {if $config['presale']['addinfotype'] == 0 }selected="selected"{/if}>日期</option>
						</select>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">⑤文本/多选</label>
				<div class="col-sm-8 col-xs-12">
					<div class="input-group">
						<input type="text" class="form-control"  placeholder="" name="presale_shops"  value="{$config['presale']['shops']}">
						<span class="input-group-addon">模式</span>
						<select class="form-control" name="presale_shopstype" id="presale_shopstype" onchange="presale_shops_change()">
							<option value="1" {if $config['presale']['shopstype'] == 1 }selected="selected"{/if}>文本</option>
							<option value="2" {if $config['presale']['shopstype'] == 2 }selected="selected"{/if}>数字</option>
							<option value="6" {if $config['presale']['shopstype'] == 6 }selected="selected"{/if}>电话</option>
							<option value="7" {if $config['presale']['shopstype'] == 7 }selected="selected"{/if}>日期</option>
							<option value="0" {if $config['presale']['shopstype'] == 0 }selected="selected"{/if}>下拉菜单</option>
							<option value="3" {if $config['presale']['shopstype'] == 3 }selected="selected"{/if}>单选</option>
							<option value="4" {if $config['presale']['shopstype'] == 4 }selected="selected"{/if}>多选</option>
							<option value="5" {if $config['presale']['shopstype'] == 5 || $config['presale']['shopstype51'] == 1} selected="selected"{/if}>商家多选</option>
							{if $config['shopstype']!=8}
							<option value="8" {if $config['presale']['shopstype'] == 8 } selected="selected"{/if}>多选分类{php echo $config['presale']['shopstype'] == 8?'':' (需先提交)';}</option>
							{/if}
							<option value="9" {if $config['presale']['shopstype'] == 9 }selected="selected"{/if}>车牌号</option>
						</select>
					</div>
					<span class="help-block">粉丝参加时默认提供姓名和电话的表单，如果需要下拉菜单类型的选项，例如【选择拍摄类型】【选择性别】【选择年级】，不需要则此处就留空；商家多选需要提交后，方可更新商家。</span>
				</div>
			</div>
			<div class="form-group" id="presael_mut_shopstype" style="{if $config['presale']['shopstype'] != 0 && $config['presale']['shopstype'] != 3 && $config['presale']['shopstype'] != 4 && $config['presale']['shopstype'] != 5 }display: none{/if}">
				<label class="col-sm-2 col-xs-12 control-label"></label>
				<div class="col-sm-8 col-xs-12">
					<div id="presale_options">
						<div class="tpl">
							{if !empty($config['presale']['options'])}
							{loop $config['presale']['options'] $index $row}
							<div class="input-group" style="margin-top: 10px;">
								<span class="input-group-addon">选项名称</span>
								<input type="text" name="presale_options[]" value="{$row}" class="form-control" placeholder="选项名称">
								{if $system['selecet_pay']==1 && in_array($config['presale']['shopstype'],[0,3,4])}
								<span class="input-group-addon">价格</span>
								<input type="text" name="presale_shops_price[]" value="{$config['presale']['shops_price'][$index]}" class="form-control" placeholder="0.00">
								{/if}
								<span class="input-group-addon"><a href="javascript:;" class="presale_delOptions"><i class="fa fa-times"></i></a></span>
							</div>
							{/loop}
							{else}
							<div class="input-group">
								<span class="input-group-addon">选项名称</span>
								<input type="text" name="presale_options[]" class="form-control" placeholder="选项名称">

								{if $system['selecet_pay']==1 && in_array($config['presale']['shopstype'],[0,3,4])}
								<span class="input-group-addon">价格</span>
								<input type="text" name="presale_shops_price[]" class="form-control" placeholder="0.00">
								{/if}
								<span class="input-group-addon"><a href="javascript:;" class="presale_delOptions"><i  class="fa fa-times"></i></a></span>
							</div>
							{/if}
						</div>
						<a href="javascript:;" class="presale_addOptions" style="margin-top: 20px;"><i style="margin-top: 10px;" class="fa fa-plus-circle"></i> 添加选项</a>
					</div>
				</div>
			</div>


			<div class="form-group" id="presale_mut41_shopstype" style="{if $config['presale']['shopstype'] != 4}display: none{/if}">
				<label class="col-sm-1 col-xs-12 control-label"></label>
				<label class="col-sm-2 col-xs-12 control-label">多选配置</label>
				<div class="col-sm-7 col-xs-12">
					<div class="input-group">
						<span class="input-group-addon">最少</span>
						<input type="text" class="form-control"  placeholder="" name="presale_shopsmin"  value="{$config['presale']['shopsmin']}">
						<span class="input-group-addon">最多</span>
						<input type="text" class="form-control"  placeholder="" name="presale_shopsmax"  value="{$config['presale']['shopsmax']}">
					</div>
				</div>
			</div>
			<div class="form-group" id="presale_mut42_shopstype" style="{if $config['presale']['shopstype'] != 4}display: none{/if}">
				<label class="col-sm-1 col-xs-12 control-label"></label>
				<label class="col-sm-2 col-xs-12 control-label">固定选项</label>
				<div class="col-sm-7 col-xs-12">
					<div id="presale_gudingoptions">
						<div class="tpl">
							{if !empty($config['presale']['gudingoptions'])}
							{loop $config['presale']['gudingoptions'] $index $row}
							<div class="input-group" style="margin-top: 10px;">
								<span class="input-group-addon">选项名称</span>
								<input type="text" name="presale_gudingoptions[]" value="{$row}" class="form-control" placeholder="选项名称">
								{if $system['selecet_pay']==1 && in_array($config['presale']['shopstype'],[0,3,4])}
								<span class="input-group-addon">价格</span>
								<input type="text" name="presale_shops_price_guding[]" value="{$config['presale']['shops_price_guding'][$index]}" class="form-control" placeholder="0.00">
								{/if}
								<span class="input-group-addon"><a href="javascript:;" class="presale_delgudingOptions"><i class="fa fa-times"></i></a></span>
							</div>
							{/loop}
							{else}
							<div class="input-group">
								<span class="input-group-addon">选项名称</span>
								<input type="text" name="presale_gudingoptions[]" class="form-control" placeholder="选项名称">
								{if $system['selecet_pay']==1 && in_array($config['presale']['shopstype'],[0,3,4])}
								<span class="input-group-addon">价格</span>
								<input type="text" name="presale_shops_price_guding[]" class="form-control" placeholder="0.00">
								{/if}
								<span class="input-group-addon"><a href="javascript:;" class="presale_delgudingOptions"><i  class="fa fa-times"></i></a></span>
							</div>
							{/if}
						</div>
						<a href="javascript:;" class="presale_addgudingOptions" style="margin-top: 20px;"><i style="margin-top: 10px;" class="fa fa-plus-circle"></i> 添加固定选项</a>
					</div>
				</div>
			</div>


			<!--						多选分类-->
			{if $config['presale']['shopstype'] == 8}
			<style>
				.w270{
					width: 270px !important;
				}
				.w80{
					width: 80px !important;
				}
				.w120{
					width: 120px !important;
				}
				.add_cate_product_item{
					color: #5c99f7;
				}
				.dx_cate_div{
					margin-top: 20px;
				}
				.dx_cate_div::after {
					content: ".";
					clear: both;
					height: 0;
					visibility: hidden;
					display: block;
				}
			</style>
			<?php
							if($system['softstyle']==101 || $system['softstyle']==102 || $system['softstyle']==104){
								$sj_list = db_getall(t_shangjia,["id >"=>0],["id","name"]);
			$sj_total = count($sj_list);
			}else{
			$sj_list = [];
			$sj_total = 0;
			}
			?>
			<!--分类设置-->
			<div class="dx_cate_info">
				{if $config['dx_cate'] && is_array($config['dx_cate'])}
				<input type="hidden" class="dx_cate_max_id" value="{$config['dx_max_cid']}">
				<input type="hidden" class="dx_cate_max_pid" value="{$config['dx_max_pid']}">
				<div class="form-group">
					<label class="col-sm-2 col-xs-12 control-label">多选分类设置</label>
					<div class="col-sm-9 col-xs-12 input-group-parent dx_cate_div_parent">
						{loop $config['dx_cate'] $index $item}
						<!--									分类单元-->
						<div class="dx_cate_div" {if $item['status']==0}style="display:none;"{/if}>
						<div class="tpl">
							<? $prefix_dx_filed = "dx_cate[".$item['id']."]"; ?>
							<div class="input-group" style="margin-top: 10px;">
								<span class="input-group-addon">分类名称</span>
								<input type="text" name="{$prefix_dx_filed}[name]" class="form-control" value="{$item['name']}" style="width: 180px;" >
								<input type="hidden" name="{$prefix_dx_filed}[id]"  class="form-control dx_category" value="{$item['id']}" >
								<span class="input-group-addon">最小数</span>
								<input type="text" name="{$prefix_dx_filed}[min]" class="form-control" value="{$item['min']}" style="width: 50px;">
								<span class="input-group-addon">最多数</span>
								<input type="text" name="{$prefix_dx_filed}[max]" class="form-control" value="{$item['max']}" style="width: 50px;">
								<span class="input-group-addon">状态</span>
								<select class="form-control cus-form-select w80" name="{$prefix_dx_filed}[status]" >
									<option value="1" {if $item['status']==1}selected="selected"{/if} >启用</option>
									<option value="0" {if $item['status']==0}selected="selected"{/if}>禁用</option>
								</select>
								<label class="input-group-addon" >
									<a href="javascript:;" class="add_cate_product_item"  >
										<i  class="fa fa-plus-circle"></i>
										添加分类商品
									</a>
								</label>
							</div>
						</div>
						<div style="clear: both;"></div>
						{if $item && is_array($item['list'])}
						{loop $item['list'] $k $v}
						<div class="col-sm-9 col-xs-12 dx_cate_product_item" style="margin-top:10px;width: 100%;">
							<? $prefix_dx_pfiled = "dx_product[".$v['id']."]"; ?>
							<div class="input-group" style="margin-top: 10px;">
								<span class="input-group-addon">商品名称</span>
								<input type="text" name="{$prefix_dx_pfiled}[name]" class="form-control w270 dx_p_name" value="{$v['name']}" >
								<input type="hidden" name="{$prefix_dx_pfiled}[id]" value="{$v['id']}" >
								<input type="hidden" name="{$prefix_dx_pfiled}[c_id]" value="{$v['c_id']}" >

								<span class="input-group-addon" {if $system['selecet_pay']==0}style="display:none;"{/if}>价格</span>
								<input type="text" name="{$prefix_dx_pfiled}[price]" class="form-control w80 dx_p_price" value="{$v['price']}" {if $system['selecet_pay']==0}style="display:none;"{/if}>
								<span class="input-group-addon" {if $sj_total==0 || $config['form_five_qty_bind_shangjia']==0}style="display:none"{/if}>绑定商家</span>
								<select class="form-control cus-form-select w120" name="{$prefix_dx_pfiled}[sj_id]" {if $sj_total==0 || $config['form_five_qty_bind_shangjia']==0}style="display:none"{/if}>
								{loop $sj_list  $vv}
								<option value="{$vv['id']}" {if $vv['id']==$v['sj_id']}selected="selected"{/if}>{$vv['name']}</option>
								{/loop}
								</select>
								<span class="input-group-addon" {if $config['form_five_qty']==0}style="display:none;"{/if}>限购</span>
								<input type="text" name="{$prefix_dx_pfiled}[qty]" class="form-control w80 dx_p_qty" value="{$v['qty']}" {if $config['form_five_qty']==0}style="display:none;"{/if} {if $v['is_default']==1}readonly{/if}>

								<span class="input-group-addon">必选</span>
								<select class="form-control cus-form-select w80 dx_p_is_default" name="{$prefix_dx_pfiled}[is_default]" >
									<option value="0" {if $v['is_default']==0}selected="selected"{/if}>否</option>
									<option value="1" {if $v['is_default']==1}selected="selected"{/if}>是</option>
								</select>
								<span class="input-group-addon">状态</span>
								<select class="form-control cus-form-select w80 product_status" name="{$prefix_dx_pfiled}[status]" >
									<option value="1" {if $v['status']==1}selected="selected"{/if}>启用</option>
									<option value="0" {if $v['status']==0}selected="selected"{/if}>禁用</option>
								</select>
							</div>
						</div>
						{/loop}
						{/if}
					</div>
					<!--									分类单元-->
					{/loop}
				</div>
			</div>
			{else}
			<input type="hidden" class="dx_cate_max_id" value="{$config['dx_max_cid']}">
			<input type="hidden" class="dx_cate_max_pid" value="{$config['dx_max_pid']}">
			<?php $config['dx_max_cid']=1; $config['dx_max_pid']=1; ;?>
			<div class="form-group">
				<label class="col-sm-2 col-xs-12 control-label">多选分类设置</label>
				<div class="col-sm-9 col-xs-12 input-group-parent dx_cate_div_parent">
					<!--									分类单元-->
					<div class="dx_cate_div">
						<div class="tpl">
							<div class="input-group" style="margin-top: 10px;">
								<span class="input-group-addon">分类名称</span>
								<input type="text" name="dx_cate[1][name]" class="form-control" value="" style="width: 180px;">
								<input type="hidden" name="dx_cate[1][id]"  class="form-control dx_category" value="1" >
								<span class="input-group-addon">最小数</span>
								<input type="text" name="dx_cate[1][min]" class="form-control" value="1" style="width: 50px;">
								<span class="input-group-addon">最多数</span>
								<input type="text" name="dx_cate[1][max]" class="form-control" value="1" style="width: 50px;">
								<span class="input-group-addon">状态</span>
								<select class="form-control cus-form-select w80" name="dx_cate[1][status]" >
									<option value="1" >启用</option>
									<option value="0" >禁用</option>
								</select>
								<label class="input-group-addon" >
									<a href="javascript:;" class="add_cate_product_item"  >
										<i  class="fa fa-plus-circle"></i>
										添加分类商品
									</a>
								</label>
							</div>
						</div>
						<div style="clear: both;"></div>
					</div>
					<!--									分类单元-->
				</div>
			</div>
			{/if}
		</div>
		<div style="width: 200px;margin-left: 240px;margin-bottom: 40px">
			<a href="javascript:;" class="add_cate_item"  style="margin-top: 40px;">
				<i style="margin-top: 10px;" class="fa fa-plus-circle"></i>
				添加多选分类
			</a>
		</div>

		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">商品总选择</label>
			<div class="col-sm-4 col-xs-12">
				<div class="input-group">
					<span class="input-group-addon">最少</span>
					<input type="number" class="form-control"  placeholder="" name="presale_shopsmin"  value="{$config['presale']['shopsmin']}">
					<span class="input-group-addon">最多</span>
					<input type="number" class="form-control"  placeholder="" name="presale_shopsmax"  value="{$config['presale']['shopsmax']}">
				</div>
			</div>
		</div>

		<script>
			var CURTCATELENGTH = Number($(".dx_cate_max_id").val());
			//添加分类
			$(".add_cate_item").click(function () {

				CURTCATELENGTH +=1;
				let temp_cate_num = CURTCATELENGTH;
				let tmp_cate_html = '<div class="dx_cate_div">\n' +
						'\t\t\t\t\t\t\t\t\t\t<div class="tpl">\n' +
						'\t\t\t\t\t\t\t\t\t\t\t<div class="input-group" style="margin-top: 10px;">\n' +
						'\t\t\t\t\t\t\t\t\t\t\t\t<span class="input-group-addon">分类名称</span>\n' +
						'\t\t\t\t\t\t\t\t\t\t\t\t<input type="text" name="dx_cate['+temp_cate_num+'][name]" class="form-control dx_c_name" value="" style="width: 180px;">\n' +
						'\t\t\t\t\t\t\t\t\t\t\t\t<input type="hidden" name="dx_cate['+temp_cate_num+'][id]"  class="form-control dx_category" value="'+temp_cate_num+'" >\n' +
						'\t\t\t\t\t\t\t\t\t\t\t\t<span class="input-group-addon">最小数</span>\n' +
						'\t\t\t\t\t\t\t\t\t\t\t\t<input type="text" name="dx_cate['+temp_cate_num+'][min]" class="form-control dx_c_min" value="1" style="width: 50px;">\n' +
						'\t\t\t\t\t\t\t\t\t\t\t\t<span class="input-group-addon">最多数</span>\n' +
						'\t\t\t\t\t\t\t\t\t\t\t\t<input type="text" name="dx_cate['+temp_cate_num+'][max]" class="form-control dx_c_max" value="1" style="width: 50px;">\n' +
						'\t\t\t\t\t\t\t\t\t\t\t\t<span class="input-group-addon">状态</span>\n' +
						'\t\t\t\t\t\t\t\t\t\t\t\t<select class="form-control cus-form-select w80 category_status" name="dx_cate['+temp_cate_num+'][status]" >\n' +
						'\t\t\t\t\t\t\t\t\t\t\t\t\t<option value="1" >启用</option>\n' +
						'\t\t\t\t\t\t\t\t\t\t\t\t\t<option value="0" >禁用</option>\n' +
						'\t\t\t\t\t\t\t\t\t\t\t\t</select>\n' +
						'\t\t\t\t\t\t\t\t\t\t\t\t<label class="input-group-addon" >\n' +
						'\t\t\t\t\t\t\t\t\t\t\t\t\t<a href="javascript:;" class="add_cate_product_item"  >\n' +
						'\t\t\t\t\t\t\t\t\t\t\t\t\t\t<i  class="fa fa-plus-circle"></i>\n' +
						'\t\t\t\t\t\t\t\t\t\t\t\t\t\t添加分类商品\n' +
						'\t\t\t\t\t\t\t\t\t\t\t\t\t</a>\n' +
						'\t\t\t\t\t\t\t\t\t\t\t\t</label>\n' +
						'\t\t\t\t\t\t\t\t\t\t\t</div>\n' +
						'\t\t\t\t\t\t\t\t\t\t</div>\n' +
						'\t\t\t\t\t\t\t\t\t</div>';
				$(".dx_cate_div_parent").append(tmp_cate_html);
				$(".dx_cate_max_id").val(CURTCATELENGTH)
			});
			var CURTPRODUCTLENGTH = Number($(".dx_cate_max_pid").val());
			//添加分类商品
			$(".dx_cate_info").on("click",".add_cate_product_item",function () {
				let cate_id = $(this).parent().parent().find(".dx_category").val();

				CURTPRODUCTLENGTH +=1;
				let temp_product_num = CURTPRODUCTLENGTH;
				let tmp_product_html= '';
				let tmp_sj_total = "{$sj_total}";
				let tmp_bind_shangjia = "{$config['form_five_qty_bind_shangjia']}";
				let selecet_pay = "{$system['selecet_pay']}";
				let form_five_qty = "{$config['form_five_qty']}";
				let price_html = '';
				let qty_html = '';
				let dx_cate_product_html = '<div class="col-sm-9 col-xs-12 dx_cate_product_item" style="margin-top:10px;width: 100%;">\n' +
						'\t\t\t\t\t\t\t\t\t\t\t<div class="input-group" style="margin-top: 10px;">\n' +
						'\t\t\t\t\t\t\t\t\t\t\t\t<span class="input-group-addon">商品名称</span>\n' +
						'\t\t\t\t\t\t\t\t\t\t\t\t<input type="text" name="dx_product['+temp_product_num+'][name]" class="form-control w270 dx_p_name" value="" >\n' +
						'\t\t\t\t\t\t\t\t\t\t\t\t<input type="hidden" name="dx_product['+temp_product_num+'][id]" value="'+temp_product_num+'" >\n' +
						'\t\t\t\t\t\t\t\t\t\t\t\t<input type="hidden" name="dx_product['+temp_product_num+'][c_id]" value="'+cate_id+'" >\n';
				if (selecet_pay==1){
					price_html = '<span class="input-group-addon">价格</span>\n' +
							'<input type="text" name="dx_product['+temp_product_num+'][price]" class="form-control w80 dx_p_price" value="0">\n';
				}else{
					price_html = '<span class="input-group-addon" style="display: none">价格</span>\n' +
							'<input type="text" name="dx_product['+temp_product_num+'][price]" class="form-control w80 dx_p_price" value="0" style="display: none">\n';
				}
				if (form_five_qty==1){
					qty_html = '<span class="input-group-addon">限购</span>\n' +
							'<input type="text" name="dx_product['+temp_product_num+'][qty]" class="form-control w80 dx_p_qty" value="9999">\n';
				}else{
					qty_html = '<span class="input-group-addon" style="display: none">限购</span>\n' +
							'<input type="text" name="dx_product['+temp_product_num+'][qty]" class="form-control w80 dx_p_qty" value="9999" style="display: none">\n';
				}
				dx_cate_product_html += price_html;
				dx_cate_product_html += qty_html;
				let sj_tmp_html = 		'\t\t\t\t\t\t\t\t\t\t\t\t<span class="input-group-addon">绑定商家</span>\n' +
						'\t\t\t\t\t\t\t\t\t\t\t\t<select class="form-control cus-form-select w120" name="dx_product['+temp_product_num+'][sj_id]" >\n';
				if (tmp_sj_total>0 ){
					{loop $sj_list  $row}
					sj_tmp_html += '<option value="'+"{$row['id']}"+'" >'+"{$row['name']}"+'</option>';
					{/loop}
						sj_tmp_html += '</select>\n';
					}

					let dx_end_html = 		'\t\t\t\t\t\t\t\t\t\t\t\t<span class="input-group-addon">必选</span>\n' +
							'\t\t\t\t\t\t\t\t\t\t\t\t<select class="form-control cus-form-select w80 dx_p_is_default" name="dx_product['+temp_product_num+'][is_default]" >\n' +
							'\t\t\t\t\t\t\t\t\t\t\t\t\t<option value="0" >否</option>\n' +
							'\t\t\t\t\t\t\t\t\t\t\t\t\t<option value="1" >是</option>\n' +
							'\t\t\t\t\t\t\t\t\t\t\t\t</select>\n' +
							'\t\t\t\t\t\t\t\t\t\t\t\t<span class="input-group-addon">状态</span>\n' +
							'\t\t\t\t\t\t\t\t\t\t\t\t<select class="form-control cus-form-select w80 product_status" name="dx_product['+temp_product_num+'][status]" >\n' +
							'\t\t\t\t\t\t\t\t\t\t\t\t\t<option value="1" >启用</option>\n' +
							'\t\t\t\t\t\t\t\t\t\t\t\t\t<option value="0" >禁用</option>\n' +
							'\t\t\t\t\t\t\t\t\t\t\t\t</select>\n' +
							'\t\t\t\t\t\t\t\t\t\t\t</div>\n' +
							'\t\t\t\t\t\t\t\t\t\t</div>';
					if (tmp_sj_total>0 && tmp_bind_shangjia>0){
						tmp_product_html = dx_cate_product_html+sj_tmp_html+dx_end_html;
					}else{
						tmp_product_html = dx_cate_product_html+dx_end_html;
					}
					$(this).parents(".dx_cate_div").append(tmp_product_html);
					$(".dx_cate_product_item").val()
				});
			//删除商品
			$(".dx_cate_info").on("change",".product_status",function () {
				let tmp_op_val = $(this).val();
				if (tmp_op_val==0){
					let dx_p_name = $(this).parent().find(".dx_p_name").val();
					let dx_p_price = $(this).parent().find(".dx_p_price").val();
					if (!dx_p_name && !dx_p_price){
						$(this).parent().parent().remove();
					}
				}
			});
			//删除分类
			$(".dx_cate_info").on("change",".category_status",function () {
				let tmp_op_val = $(this).val();
				if (tmp_op_val==0){
					let dx_c_name = $(this).parent().find(".dx_c_name").val();
					let dx_c_min = $(this).parent().find(".dx_c_min").val();
					let dx_c_max = $(this).parent().find(".dx_c_max").val();
					if (!dx_c_name && !dx_c_min && !dx_c_max){
						$(this).parent().parent().parent().remove();
					}
				}
			});
			//必选切换
			$(".dx_cate_info").on("change",".dx_p_is_default",function () {
				var form_five_qty_status = "{$config['form_five_qty']}";
				if (form_five_qty_status==1){
					let tmp_val = $(this).val();
					if (tmp_val==1){
						$(this).parent().children(".dx_p_qty").val(9999);
						$(this).parent().children(".dx_p_qty").attr("readonly","readonly");
					}else{
						$(this).parent().children(".dx_p_qty").removeAttr("readonly");
					}
				}
			});
		</script>

		{/if}
		<!--						多选分类-->

		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">协议条款</label>
			<div class="col-sm-8 col-xs-12">
				<input type="text" class="form-control"  placeholder="" name="presale_xieyi"  value="{$config['presale']['xieyi']}">
				<span class="help-block">例如:已知晓本定单不退不换 客户只有勾选才可以付款</span>
			</div>
		</div>

	</div>
</div>
{if $config['presale']['presalePrice']>=2}
<div class="panel panel-default" role="tabpanel" style="">
	<div class="panel-heading">补款表单②设置</div>
	<div class="panel-body" style="">

		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">姓名</label>
			<div class="col-sm-8 col-xs-12">
				<input type="text" class="form-control"  placeholder="" name="presale_nametext2"  value="{$config['presale']['form2']['nametext']}">
				<span class="help-block">默认为[姓名],可以任意修改,如改成[宝宝姓名]</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">电话</label>
			<div class="col-sm-8 col-xs-12">
				{if $system['softmode']==1 && $system['is_new_wxapp']==1}
				<div class="input-group">
					<input type="text" class="form-control"  placeholder="" name="presale_mobiletext2"  value="{$config['presale']['form2']['mobiletext']}">
					<span class="input-group-addon">模式</span>
					<select class="form-control" name="presale_mobile_input_type2">
						<option value="1" {if $config['presale']['form2']['mobile_input_type'] == 1 || !$config['presale']['form2']['mobile_input_type']}selected="selected"{/if}>自由输入</option>
						<option value="2" {if $config['presale']['form2']['mobile_input_type'] == 2 }selected="selected"{/if}>强制采集</option>
					</select>
				</div>
				{else}
				<input type="text" class="form-control"  placeholder="" name="presale_mobiletext2"  value="{$config['presale']['form2']['mobiletext']}">
				{/if}
				<span class="help-block">默认为[手机号],可以任意修改,如改成[妈妈电话]</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">①文本/日期</label>
			<div class="col-sm-8 col-xs-12">
				<div class="input-group">
					<input type="text" class="form-control"  placeholder="" name="presale_datetime2"  value="{$config['presale']['form2']['datetime']}">
					<span class="input-group-addon">模式</span>
					<select class="form-control" name="presale_datetimetype2">
						<option value="1" {if $config['presale']['form2']['datetimetype'] == 1 }selected="selected"{/if}>文本</option>
						<option value="2" {if $config['presale']['form2']['datetimetype'] == 2 }selected="selected"{/if}>数字</option>
						<option value="6" {if $config['presale']['form2']['datetimetype'] == 6 }selected="selected"{/if}>电话</option>
						<option value="0" {if $config['presale']['form2']['datetimetype'] == 0 }selected="selected"{/if}>日期</option>
					</select>
				</div>
				<span class="help-block">例如需要日期信息，此处填【**日期】，例如 预约日期，不需要地址信息此处就留空</span>
			</div>
		</div>

		{if ($system['softstyle']!=5 && $system['gift']!=1) }
		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">②文本/选项</label>
			<div class="col-sm-8 col-xs-12">
				<div class="input-group">
					<input type="text" class="form-control"  placeholder="" name="presale_address2"  value="{$config['presale']['form2']['address']}">
					<span class="input-group-addon">模式</span>
					<select class="form-control" name="presale_addresstype2">
						<option value="0" {if $config['presale']['form2']['addresstype'] == 0 }selected="selected"{/if}>文本</option>
						<option value="1" {if $config['presale']['form2']['addresstype'] == 1 }selected="selected"{/if}>数字</option>
						<option value="6" {if $config['presale']['form2']['addresstype'] == 6 }selected="selected"{/if}>电话</option>
						<option value="7" {if $config['presale']['form2']['addresstype'] == 7 }selected="selected"{/if}>日期</option>
						<option value="2" {if $config['presale']['form2']['addresstype'] == 2 }selected="selected"{/if}>下拉菜单</option>
						<option value="3" {if $config['presale']['form2']['addresstype'] == 3 }selected="selected"{/if}>单选</option>
						<option value="9" {if $config['presale']['form2']['addresstype'] == 9 }selected="selected"{/if}>车牌号</option>
					</select>
				</div>
				<span class="help-block">例如需要地址信息，此处填【**地址】，例如 您的地址，不需要地址信息此处就留空</span>
			</div>
		</div>
		{if $config['presale']['form2']['addresstype'] == 2 || $config['presale']['form2']['addresstype'] == 3 }
		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label"></label>
			<div class="col-sm-8 col-xs-12">
				<div id="addressOptions2">
					<div class="tpl">
						{if !empty($config['presale']['form2']['addressoptions'])}
						{loop $config['presale']['form2']['addressoptions'] $row}
						<div class="input-group" style="margin-top: 10px;">
							<span class="input-group-addon">选项名称</span>
							<input type="text" name="presale_addressOptions2[]" value="{$row}" class="form-control" placeholder="选项名称">
							<span class="input-group-addon"><a href="javascript:;" class="deladdressOptions2"><i class="fa fa-times"></i></a></span>
						</div>
						{/loop}
						{else}
						<div class="input-group">
							<span class="input-group-addon">选项名称</span>
							<input type="text" name="presale_addressOptions2[]" class="form-control" placeholder="选项名称">
							<span class="input-group-addon"><a href="javascript:;" class="deladdressOptions2"><i  class="fa fa-times"></i></a></span>
						</div>
						{/if}
					</div>
					<a href="javascript:;" class="addaddressOptions2" style="margin-top: 20px;"><i style="margin-top: 10px;" class="fa fa-plus-circle"></i> 添加选项</a>
				</div>
			</div>
		</div>
		{/if}
		{/if}

		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">③文本/选项</label>
			<div class="col-sm-8 col-xs-12">
				<div class="input-group">
					<input type="text" class="form-control"  placeholder="" name="presale_formtwo2"  value="{$config['presale']['form2']['formtwo']}">
					<span class="input-group-addon">模式</span>
					<select class="form-control" name="presale_formtwotype2">
						<option value="0" {if $config['presale']['form2']['formtwotype'] == 0 }selected="selected"{/if}>文本</option>
						<option value="1" {if $config['presale']['form2']['formtwotype'] == 1 }selected="selected"{/if}>数字</option>
						<option value="6" {if $config['presale']['form2']['formtwotype'] == 6 }selected="selected"{/if}>电话</option>
						<option value="7" {if $config['presale']['form2']['formtwotype'] == 7 }selected="selected"{/if}>日期</option>
						<option value="2" {if $config['presale']['form2']['formtwotype'] == 2 }selected="selected"{/if}>下拉菜单</option>
						<option value="3" {if $config['presale']['form2']['formtwotype'] == 3 }selected="selected"{/if}>单选</option>
						<option value="9" {if $config['presale']['form2']['formtwotype'] == 9 }selected="selected"{/if}>车牌号</option>
					</select>
				</div>
				<span class="help-block">例如需要地址信息，此处填【**地址】，例如 您的地址，不需要地址信息此处就留空</span>
			</div>
		</div>
		{if $config['presale']['form2']['formtwotype'] == 2 || $config['presale']['form2']['formtwotype'] == 3 }
		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label"></label>
			<div class="col-sm-8 col-xs-12">
				<div id="presale_formtwoOptions2">
					<div class="tpl">
						{if !empty($config['presale']['form2']['formtwooptions'])}
						{loop $config['presale']['form2']['formtwooptions'] $row}
						<div class="input-group" style="margin-top: 10px;">
							<span class="input-group-addon">选项名称</span>
							<input type="text" name="presale_formtwoOptions2[]" value="{$row}" class="form-control" placeholder="选项名称">
							<span class="input-group-addon"><a href="javascript:;" class="presale_delformtwoOptions2"><i class="fa fa-times"></i></a></span>
						</div>
						{/loop}
						{else}
						<div class="input-group">
							<span class="input-group-addon">选项名称</span>
							<input type="text" name="presale_formtwoOptions2[]" class="form-control" placeholder="选项名称">
							<span class="input-group-addon"><a href="javascript:;" class="presale_delformtwoOptions2"><i  class="fa fa-times"></i></a></span>
						</div>
						{/if}
					</div>
					<a href="javascript:;" class="presale_addformtwoOptions2" style="margin-top: 20px;"><i style="margin-top: 10px;" class="fa fa-plus-circle"></i> 添加选项</a>
				</div>
			</div>
		</div>
		{/if}
		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">④文本/日期</label>
			<div class="col-sm-8 col-xs-12">
				<div class="input-group">
					<input type="text" class="form-control"  placeholder="" name="presale_addinfo2"  value="{$config['presale']['form2']['addinfo']}">
					<span class="input-group-addon">模式</span>
					<select class="form-control" name="presale_addinfotype2">
						<option value="1" {if $config['presale']['form2']['addinfotype'] == 1 }selected="selected"{/if}>文本</option>
						<option value="2" {if $config['presale']['form2']['addinfotype'] == 2 }selected="selected"{/if}>数字</option>
						<option value="6" {if $config['presale']['form2']['addinfotype'] == 6 }selected="selected"{/if}>电话</option>
						<option value="0" {if $config['presale']['form2']['addinfotype'] == 0 }selected="selected"{/if}>日期</option>
					</select>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">⑤文本/选项</label>
			<div class="col-sm-8 col-xs-12">
				<div class="input-group">
					<input type="text" class="form-control"  placeholder="" name="presale_shops2"  value="{$config['presale']['form2']['shops']}">
					<span class="input-group-addon">模式</span>
					<select class="form-control" name="presale_shopstype2">
						<option value="1" {if $config['presale']['form2']['shopstype'] == 1 }selected="selected"{/if}>文本</option>
						<option value="2" {if $config['presale']['form2']['shopstype'] == 2 }selected="selected"{/if}>数字</option>
						<option value="6" {if $config['presale']['form2']['shopstype'] == 6 }selected="selected"{/if}>电话</option>
						<option value="7" {if $config['presale']['form2']['shopstype'] == 7 }selected="selected"{/if}>日期</option>
						<option value="0" {if $config['presale']['form2']['shopstype'] == 0 }selected="selected"{/if}>下拉菜单</option>
						<option value="3" {if $config['presale']['form2']['shopstype'] == 3 }selected="selected"{/if}>单选</option>
						<option value="4" {if $config['presale']['form2']['shopstype'] == 4 }selected="selected"{/if}>多选</option>
						<option value="5" {if $config['presale']['form2']['shopstype'] == 5 || $config['presale']['form2']['shopstype5'] == 1} selected="selected"{/if}>商家多选</option>
						<option value="9" {if $config['presale']['form2']['shopstype'] == 9} selected="selected"{/if}>车牌号</option>
					</select>
				</div>
				<span class="help-block">粉丝参加时默认提供姓名和电话的表单，如果需要下拉菜单类型的选项，例如【选择拍摄类型】【选择性别】【选择年级】，不需要则此处就留空；商家多选需要提交后，方可更新商家。</span>
			</div>
		</div>
		{if $config['presale']['form2']['shopstype'] != 1 && $config['presale']['form2']['shopstype'] != 2 }
		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label"></label>
			<div class="col-sm-8 col-xs-12">
				<div id="presale_Options2">
					<div class="tpl">
						{if !empty($config['presale']['form2']['options'])}
						{loop $config['presale']['form2']['options'] $row}
						<div class="input-group" style="margin-top: 10px;">
							<span class="input-group-addon">选项名称</span>
							<input type="text" name="presale_Options2[]" value="{$row}" class="form-control" placeholder="选项名称">
							<span class="input-group-addon"><a href="javascript:;" class="presale_delOptions2"><i class="fa fa-times"></i></a></span>
						</div>
						{/loop}
						{else}
						<div class="input-group">
							<span class="input-group-addon">选项名称</span>
							<input type="text" name="presale_Options2[]" class="form-control" placeholder="选项名称">
							<span class="input-group-addon"><a href="javascript:;" class="presale_delOptions2"><i  class="fa fa-times"></i></a></span>
						</div>
						{/if}
					</div>
					<a href="javascript:;" class="presale_addOptions2" style="margin-top: 20px;"><i style="margin-top: 10px;" class="fa fa-plus-circle"></i> 添加选项</a>
				</div>
			</div>
		</div>
		{/if}
		{if $config['presale']['form2']['shopstype'] == 4 }
		<div class="form-group">
			<label class="col-sm-1 col-xs-12 control-label"></label>
			<label class="col-sm-2 col-xs-12 control-label">多选配置</label>
			<div class="col-sm-7 col-xs-12">
				<div class="input-group">
					<span class="input-group-addon">最少</span>
					<input type="text" class="form-control"  placeholder="" name="presale_shopsmin2"  value="{$config['presale']['form2']['shopsmin']}">
					<span class="input-group-addon">最多</span>
					<input type="text" class="form-control"  placeholder="" name="presale_shopsmax2"  value="{$config['presale']['form2']['shopsmax']}">
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-1 col-xs-12 control-label"></label>
			<label class="col-sm-2 col-xs-12 control-label">固定选项</label>
			<div class="col-sm-7 col-xs-12">
				<div id="gudingOptions2">
					<div class="tpl">
						{if !empty($config['presale']['form2']['gudingoptions'])}
						{loop $config['presale']['form2']['gudingoptions'] $row}
						<div class="input-group" style="margin-top: 10px;">
							<span class="input-group-addon">选项名称</span>
							<input type="text" name="presale_gudingOptions2[]" value="{$row}" class="form-control" placeholder="选项名称">
							<span class="input-group-addon"><a href="javascript:;" class="delgudingOptions2"><i class="fa fa-times"></i></a></span>
						</div>
						{/loop}
						{else}
						<div class="input-group">
							<span class="input-group-addon">选项名称</span>
							<input type="text" name="presale_gudingOptions2[]" class="form-control" placeholder="选项名称">
							<span class="input-group-addon"><a href="javascript:;" class="delgudingOptions2"><i  class="fa fa-times"></i></a></span>
						</div>
						{/if}
					</div>
					<a href="javascript:;" class="addgudingOptions2" style="margin-top: 20px;"><i style="margin-top: 10px;" class="fa fa-plus-circle"></i> 添加固定选项</a>
				</div>
			</div>
		</div>
		{/if}

		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">协议条款</label>
			<div class="col-sm-8 col-xs-12">
				<input type="text" class="form-control"  placeholder="" name="presale_xieyi2"  value="{$config['presale']['form2']['xieyi']}">
				<span class="help-block">例如:已知晓本定单不退不换 客户只有勾选才可以付款</span>
			</div>
		</div>

	</div>
</div>
{/if}

{if $config['presale']['presalePrice']>=3}
<div class="panel panel-default" role="tabpanel" style="">
	<div class="panel-heading">补款表单③设置</div>
	<div class="panel-body" style="">

		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">姓名</label>
			<div class="col-sm-8 col-xs-12">
				<input type="text" class="form-control"  placeholder="" name="presale_nametext3"  value="{$config['presale']['form3']['nametext']}">
				<span class="help-block">默认为[姓名],可以任意修改,如改成[宝宝姓名]</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">电话</label>
			<div class="col-sm-8 col-xs-12">
				{if $system['softmode']==1 && $system['is_new_wxapp']==1}
				<div class="input-group">
					<input type="text" class="form-control"  placeholder="" name="presale_mobiletext3"  value="{$config['presale']['form3']['mobiletext']}">
					<span class="input-group-addon">模式</span>
					<select class="form-control" name="presale_mobile_input_type3">
						<option value="1" {if $config['presale']['form3']['mobile_input_type'] == 1 || !$config['presale']['form3']['mobile_input_type']}selected="selected"{/if}>自由输入</option>
						<option value="2" {if $config['presale']['form3']['mobile_input_type'] == 2 }selected="selected"{/if}>强制采集</option>
					</select>
				</div>
				{else}
				<input type="text" class="form-control"  placeholder="" name="presale_mobiletext3"  value="{$config['presale']['form3']['mobiletext']}">
				{/if}
				<span class="help-block">默认为[手机号],可以任意修改,如改成[妈妈电话]</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">①文本/日期</label>
			<div class="col-sm-8 col-xs-12">
				<div class="input-group">
					<input type="text" class="form-control"  placeholder="" name="presale_datetime3"  value="{$config['presale']['form3']['datetime']}">
					<span class="input-group-addon">模式</span>
					<select class="form-control" name="presale_datetimetype3">
						<option value="1" {if $config['presale']['form3']['datetimetype'] == 1 }selected="selected"{/if}>文本</option>
						<option value="2" {if $config['presale']['form3']['datetimetype'] == 2 }selected="selected"{/if}>数字</option>
						<option value="6" {if $config['presale']['form3']['datetimetype'] == 6 }selected="selected"{/if}>电话</option>
						<option value="0" {if $config['presale']['form3']['datetimetype'] == 0 }selected="selected"{/if}>日期</option>
					</select>
				</div>
				<span class="help-block">例如需要日期信息，此处填【**日期】，例如 预约日期，不需要地址信息此处就留空</span>
			</div>
		</div>

		{if ($system['softstyle']!=5 && $system['gift']!=1) }
		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">②文本/选项</label>
			<div class="col-sm-8 col-xs-12">
				<div class="input-group">
					<input type="text" class="form-control"  placeholder="" name="presale_address3"  value="{$config['presale']['form3']['address']}">
					<span class="input-group-addon">模式</span>
					<select class="form-control" name="presale_addresstype3">
						<option value="0" {if $config['presale']['form3']['addresstype'] == 0 }selected="selected"{/if}>文本</option>
						<option value="1" {if $config['presale']['form3']['addresstype'] == 1 }selected="selected"{/if}>数字</option>
						<option value="6" {if $config['presale']['form3']['addresstype'] == 6 }selected="selected"{/if}>电话</option>
						<option value="7" {if $config['presale']['form3']['addresstype'] == 7 }selected="selected"{/if}>日期</option>
						<option value="2" {if $config['presale']['form3']['addresstype'] == 2 }selected="selected"{/if}>下拉菜单</option>
						<option value="3" {if $config['presale']['form3']['addresstype'] == 3 }selected="selected"{/if}>单选</option>
						<option value="9" {if $config['presale']['form3']['addresstype'] == 9 }selected="selected"{/if}>车牌号</option>
					</select>
				</div>
				<span class="help-block">例如需要地址信息，此处填【**地址】，例如 您的地址，不需要地址信息此处就留空</span>
			</div>
		</div>
		{if $config['presale']['form3']['addresstype'] == 2 || $config['presale']['form3']['addresstype'] == 3 }
		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label"></label>
			<div class="col-sm-8 col-xs-12">
				<div id="addressOptions3">
					<div class="tpl">
						{if !empty($config['presale']['form3']['addressoptions'])}
						{loop $config['presale']['form3']['addressoptions'] $row}
						<div class="input-group" style="margin-top: 10px;">
							<span class="input-group-addon">选项名称</span>
							<input type="text" name="presale_addressOptions3[]" value="{$row}" class="form-control" placeholder="选项名称">
							<span class="input-group-addon"><a href="javascript:;" class="deladdressOptions3"><i class="fa fa-times"></i></a></span>
						</div>
						{/loop}
						{else}
						<div class="input-group">
							<span class="input-group-addon">选项名称</span>
							<input type="text" name="presale_addressOptions3[]" class="form-control" placeholder="选项名称">
							<span class="input-group-addon"><a href="javascript:;" class="deladdressOptions3"><i  class="fa fa-times"></i></a></span>
						</div>
						{/if}
					</div>
					<a href="javascript:;" class="addaddressOptions3" style="margin-top: 20px;"><i style="margin-top: 10px;" class="fa fa-plus-circle"></i> 添加选项</a>
				</div>
			</div>
		</div>
		{/if}
		{/if}
		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">③文本/选项</label>
			<div class="col-sm-8 col-xs-12">
				<div class="input-group">
					<input type="text" class="form-control"  placeholder="" name="presale_formtwo3"  value="{$config['presale']['form3']['formtwo']}">
					<span class="input-group-addon">模式</span>
					<select class="form-control" name="presale_formtwotype3">
						<option value="0" {if $config['presale']['form3']['formtwotype'] == 0 }selected="selected"{/if}>文本</option>
						<option value="1" {if $config['presale']['form3']['formtwotype'] == 1 }selected="selected"{/if}>数字</option>
						<option value="6" {if $config['presale']['form3']['formtwotype'] == 6 }selected="selected"{/if}>电话</option>
						<option value="7" {if $config['presale']['form3']['formtwotype'] == 7 }selected="selected"{/if}>日期</option>
						<option value="2" {if $config['presale']['form3']['formtwotype'] == 2 }selected="selected"{/if}>下拉菜单</option>
						<option value="3" {if $config['presale']['form3']['formtwotype'] == 3 }selected="selected"{/if}>单选</option>
						<option value="9" {if $config['presale']['form3']['formtwotype'] == 9 }selected="selected"{/if}>车牌号</option>
					</select>
				</div>
				<span class="help-block">例如需要地址信息，此处填【**地址】，例如 您的地址，不需要地址信息此处就留空</span>
			</div>
		</div>
		{if $config['presale']['form3']['formtwotype'] == 2 || $config['presale']['form3']['formtwotype'] == 3 }
		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label"></label>
			<div class="col-sm-8 col-xs-12">
				<div id="presale_formtwoOptions3">
					<div class="tpl">
						{if !empty($config['presale']['form3']['formtwooptions'])}
						{loop $config['presale']['form3']['formtwooptions'] $row}
						<div class="input-group" style="margin-top: 10px;">
							<span class="input-group-addon">选项名称</span>
							<input type="text" name="presale_formtwoOptions3[]" value="{$row}" class="form-control" placeholder="选项名称">
							<span class="input-group-addon"><a href="javascript:;" class="presale_delformtwoOptions3"><i class="fa fa-times"></i></a></span>
						</div>
						{/loop}
						{else}
						<div class="input-group">
							<span class="input-group-addon">选项名称</span>
							<input type="text" name="presale_formtwoOptions3[]" class="form-control" placeholder="选项名称">
							<span class="input-group-addon"><a href="javascript:;" class="presale_delformtwoOptions3"><i  class="fa fa-times"></i></a></span>
						</div>
						{/if}
					</div>
					<a href="javascript:;" class="presale_addformtwoOptions3" style="margin-top: 20px;"><i style="margin-top: 10px;" class="fa fa-plus-circle"></i> 添加选项</a>
				</div>
			</div>
		</div>
		{/if}
		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">④文本/日期</label>
			<div class="col-sm-8 col-xs-12">
				<div class="input-group">
					<input type="text" class="form-control"  placeholder="" name="presale_addinfo3"  value="{$config['presale']['form3']['addinfo']}">
					<span class="input-group-addon">模式</span>
					<select class="form-control" name="presale_addinfotype3">
						<option value="1" {if $config['presale']['form3']['addinfotype'] == 1 }selected="selected"{/if}>文本</option>
						<option value="2" {if $config['presale']['form3']['addinfotype'] == 2 }selected="selected"{/if}>数字</option>
						<option value="6" {if $config['presale']['form3']['addinfotype'] == 6 }selected="selected"{/if}>电话</option>
						<option value="0" {if $config['presale']['form3']['addinfotype'] == 0 }selected="selected"{/if}>日期</option>
					</select>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">⑤文本/选项</label>
			<div class="col-sm-8 col-xs-12">
				<div class="input-group">
					<input type="text" class="form-control"  placeholder="" name="presale_shops3"  value="{$config['presale']['form3']['shops']}">
					<span class="input-group-addon">模式</span>
					<select class="form-control" name="presale_shopstype3">
						<option value="1" {if $config['presale']['form3']['shopstype'] == 1 }selected="selected"{/if}>文本</option>
						<option value="2" {if $config['presale']['form3']['shopstype'] == 2 }selected="selected"{/if}>数字</option>
						<option value="6" {if $config['presale']['form3']['shopstype'] == 6 }selected="selected"{/if}>电话</option>
						<option value="7" {if $config['presale']['form3']['shopstype'] == 7 }selected="selected"{/if}>日期</option>
						<option value="0" {if $config['presale']['form3']['shopstype'] == 0 }selected="selected"{/if}>下拉菜单</option>
						<option value="3" {if $config['presale']['form3']['shopstype'] == 3 }selected="selected"{/if}>单选</option>
						<option value="4" {if $config['presale']['form3']['shopstype'] == 4 }selected="selected"{/if}>多选</option>
						<option value="5" {if $config['presale']['form3']['shopstype'] == 5 || $config['presale']['form3']['shopstype5'] == 1} selected="selected"{/if}>商家多选</option>
						<option value="9" {if $config['presale']['form3']['shopstype'] == 9} selected="selected"{/if}>车牌号</option>
					</select>
				</div>
				<span class="help-block">粉丝参加时默认提供姓名和电话的表单，如果需要下拉菜单类型的选项，例如【选择拍摄类型】【选择性别】【选择年级】，不需要则此处就留空；商家多选需要提交后，方可更新商家。</span>
			</div>
		</div>
		{if $config['presale']['form3']['shopstype'] != 1 && $config['presale']['form3']['shopstype'] != 2 }
		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label"></label>
			<div class="col-sm-8 col-xs-12">
				<div id="Options3">
					<div class="tpl">
						{if !empty($config['presale']['form3']['options'])}
						{loop $config['presale']['form3']['options'] $row}
						<div class="input-group" style="margin-top: 10px;">
							<span class="input-group-addon">选项名称</span>
							<input type="text" name="presale_Options3[]" value="{$row}" class="form-control" placeholder="选项名称">
							<span class="input-group-addon"><a href="javascript:;" class="presale_delOptions3"><i class="fa fa-times"></i></a></span>
						</div>
						{/loop}
						{else}
						<div class="input-group">
							<span class="input-group-addon">选项名称</span>
							<input type="text" name="presale_Options3[]" class="form-control" placeholder="选项名称">
							<span class="input-group-addon"><a href="javascript:;" class="presale_delOptions3"><i  class="fa fa-times"></i></a></span>
						</div>
						{/if}
					</div>
					<a href="javascript:;" class="presale_addOptions3" style="margin-top: 20px;"><i style="margin-top: 10px;" class="fa fa-plus-circle"></i> 添加选项</a>
				</div>
			</div>
		</div>
		{/if}
		{if $config['presale']['form3']['shopstype'] == 4 }
		<div class="form-group">
			<label class="col-sm-1 col-xs-12 control-label"></label>
			<label class="col-sm-2 col-xs-12 control-label">多选配置</label>
			<div class="col-sm-7 col-xs-12">
				<div class="input-group">
					<span class="input-group-addon">最少</span>
					<input type="text" class="form-control"  placeholder="" name="presale_shopsmin3"  value="{$config['presale']['form3']['shopsmin']}">
					<span class="input-group-addon">最多</span>
					<input type="text" class="form-control"  placeholder="" name="presale_shopsmax3"  value="{$config['presale']['form3']['shopsmax']}">
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-1 col-xs-12 control-label"></label>
			<label class="col-sm-2 col-xs-12 control-label">固定选项</label>
			<div class="col-sm-7 col-xs-12">
				<div id="gudingOptions3">
					<div class="tpl">
						{if !empty($config['presale']['form3']['gudingoptions'])}
						{loop $config['presale']['form3']['gudingoptions'] $row}
						<div class="input-group" style="margin-top: 10px;">
							<span class="input-group-addon">选项名称</span>
							<input type="text" name="presale_gudingOptions3[]" value="{$row}" class="form-control" placeholder="选项名称">
							<span class="input-group-addon"><a href="javascript:;" class="delgudingOptions3"><i class="fa fa-times"></i></a></span>
						</div>
						{/loop}
						{else}
						<div class="input-group">
							<span class="input-group-addon">选项名称</span>
							<input type="text" name="presale_gudingOptions3[]" class="form-control" placeholder="选项名称">
							<span class="input-group-addon"><a href="javascript:;" class="delgudingOptions3"><i  class="fa fa-times"></i></a></span>
						</div>
						{/if}
					</div>
					<a href="javascript:;" class="addgudingOptions3" style="margin-top: 20px;"><i style="margin-top: 10px;" class="fa fa-plus-circle"></i> 添加固定选项</a>
				</div>
			</div>
		</div>
		{/if}

		<div class="form-group">
			<label class="col-sm-2 col-xs-12 control-label">协议条款</label>
			<div class="col-sm-8 col-xs-12">
				<input type="text" class="form-control"  placeholder="" name="presale_xieyi3"  value="{$config['presale']['form3']['xieyi']}">
				<span class="help-block">例如:已知晓本定单不退不换 客户只有勾选才可以付款</span>
			</div>
		</div>

	</div>
</div>
{/if}

</div>
<script type="text/javascript">
	const bukuan_type = $('#bukuan_type input:checked').val();
	handlebukuan(bukuan_type,$('#bukuan_type input:checked'));
	$('#bukuan_type input').change(function(){
		let val = $(this).val();
		handlebukuan(val,$(this))
	})
	function handlebukuan(val, obj) {
		// obj.parents('.form-group').next().hide()
		// obj.parents('.form-group').next().next().hide();
		// obj.parents('.form-group').next().next().next().hide()
		obj.parents('.form-group').siblings('.buyukuanbtn').hide();
		// if(val == 1) {
		// 	// obj.parents('.form-group').next().show()
		// }
		if(val == 2) {
			obj.parents('.form-group').next().show()
			obj.parents('.form-group').next().next().show()
		}
		if(val == 3) {
			obj.parents('.form-group').siblings('.buyukuanbtn').show();
			// $(this).parents('.form-group').next().show()
		}
	}
</script>
{/if}